﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockJournalDisplay.aspx.cs"
    Inherits="Main_Inventory_StockJournalDisplay" %>

<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>StockJournal Display</title>
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function OpenStockDisplay(TFOID, SJRID, Category, FormatName, FormatNo, Date) {
            window.open('StockJournalDisplayDetails.aspx?TFOID=' + TFOID + '&SJRID=' + SJRID + '&Category=' + Category + '&FormatName=' + FormatName + '&FormatNo=' + FormatNo + '&Date=' + Date, '', '');
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="divmain" style="width: 98%; margin-left: 1%;">
        <acc:heading ID="pagehead" runat="server" HeadingText="Stock Journal View" />
        <div style="margin-left: 3%; margin-right: 2%; width: 100%" align="center">
            <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
        </div>
    </div>
    <div style="width: 100%; margin-left: 1%;">
        <center>
            <asp:DropDownList ID="ddlstkjrnCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlstkjrnCategory_OnSelectedIndex" CssClass="dropdown">
                <asp:ListItem Value="0" Text="--- Select Format ---"></asp:ListItem>
                <asp:ListItem Value="1" Text="Stock Journal"></asp:ListItem>
                <asp:ListItem Value="2" Text="Production Journal"></asp:ListItem>
                <asp:ListItem Value="3" Text="Stock Issue"></asp:ListItem>
                <asp:ListItem Value="4" Text="Stock Receipt"></asp:ListItem>
                <asp:ListItem Value="5" Text="Stock Transfer"></asp:ListItem>
                <asp:ListItem Value="6" Text="Physical Stock"></asp:ListItem>
            </asp:DropDownList>
            <%--<asp:HiddenField ID="hid_TFOID" runat="server" />--%>
            <div style="margin-top: 10px;">
                <asp:GridView ID="grdstkjrnldisp" Width="90%" runat="server" DataKeyNames="TFOID,SJRID"
                    AutoGenerateColumns="false" OnRowDataBound="grdstkjrnldisp_RowDataBound" CssClass="gridview"
                    AlternatingRowStyle-CssClass="gridview_alternate">
                    <Columns>
                        <asp:TemplateField HeaderText="Journal Format">
                            <ItemTemplate>
                                <asp:Label ID="lblformatname" runat="server" Text='<%#Eval("TFOID")%>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Journal No">
                            <ItemTemplate>
                                <asp:Label ID="lblformatno" runat="server" Text='<%#Eval("SJRNUM")%>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Date">
                            <ItemTemplate>
                                <asp:Label ID="lbldate" runat="server" Text='<%#Eval("SJRDATE","{0:dd/M/yyyy}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Details">
                            <ItemTemplate>
                                <asp:HyperLink ID="hypdetails" runat="server" NavigateUrl="#" Text="Details"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Edit">
                            <ItemTemplate>
                                <asp:HyperLink ID="hypedit" runat="server" NavigateUrl="#" Text="Edit"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </center>
    </div>
    </form>
</body>
</html>
